/*
 * @Author: your name
 * @Date: 2021-12-20 19:12:58
 * @LastEditTime: 2021-12-21 19:09:20
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \day10 react\my-app\src\views\index\index.js
 */
import React, { Component } from 'react';

import {NavLink,Switch,Route,Redirect} from "react-router-dom"
import Home from "./home/home.js"
import Roll from "./roll/roll"
import My from "./my/my"

import Indexmodule from "./index.module.scss"
// console.log(Indexmodule);
 
class index extends Component {
    render() { 
        return (
            <div className={Indexmodule.index}>
                <Switch>
                    <Route path="/index/home" component={Home}/>
                    <Route path="/index/roll" component={Roll}/>
                    <Route path="/index/my" component={My}/>
                    <Redirect from="/index" to="/index/home"/>
                </Switch>
               <div className={Indexmodule.footer}>
                    <NavLink to="/index/home">首页</NavLink>
                    <NavLink to="/index/roll">分类</NavLink>
                    <NavLink to="/index/my">我的</NavLink>
               </div>
            </div>
        );
    }
}
 
export default index;